<template>
	<view v-if="show" class="unio2o-modal-middle">
		<view @click="closed()" class="bg"></view>
		<view class="unio2o-modal-middle-main" :class="show ? 'animated fast zoomInUp' :''">
			<view class="pd30 flex space alcenter">
				<text class="ft18 ftw600 text-default">{{title}}</text>
				<text  @click="closed()" class="iconfont iconbtn_close_black ft18"></text>
			</view>
			<view class="line"></view>
			<slot />
		</view>	
	</view>
</template>

<script>
	export default{
		props:{
			show:{
				type:Boolean,
				default:false
			},
			title:{
				type:String,
				default:''
			}
		},
		data(){
			return {
				
			}
		},
		methods:{
			closed(){
				this.$emit('closed',true);
			}	
		}
	}
</script>

<style>
	.unio2o-modal-middle{
		width: 100%;
		height: 100vh;
		position: fixed;
		z-index: 400;
		left: 0;
		top: 0;
	}
	.unio2o-modal-middle .bg{
		position: fixed;
		width: 100%;
		height: 100vh;
		background: rgba(0,0,0,.3);
		z-index: 401;
		left: 0;
		top: 0;
	}
	.unio2o-modal-middle-main{
		width: 690rpx;
		min-height: 400rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		position: fixed;
		top: 50%;
		left: calc(50% - 345rpx);
		transform:translateY(-50%);
		z-index: 402;
	}
</style>